﻿<Column ColumnSize="ColumnSize.Is12.OnMobile.Is6.OnTablet.Is4.OnDesktop">
    <Card Margin="Margin.Is4.FromBottom" Shadow="Shadow.Default" Border="Border.Is0">
        <CardImage Source="@ImageSource" Alt="Blog post image"></CardImage>
        <CardBody Padding="Padding.Is0.FromBottom">
            <CardTitle>
                @if ( To != null )
                {
                    <Anchor To="@To" Title="Blog post image" Stretched>
                        @ToText
                    </Anchor>
                }
            </CardTitle>
            <CardText>
                <article>
                    <Paragraph Margin="Margin.Is0.FromTop">
                        <Small>
                            @ChildContent
                        </Small>
                    </Paragraph>
                </article>
            </CardText>
        </CardBody>
        <CardBody Padding="Padding.Is0.OnY">
            <BlogPagePostInfo UserName="@AuthorName" ImageName="@AuthorImage" PostedOn="@PostedOn" Read="@ReadTime" />
        </CardBody>
    </Card>
</Column>
@code {
    [Parameter] public string To { get; set; }

    [Parameter] public string ToText { get; set; }

    [Parameter] public string ImageSource { get; set; }

    [Parameter] public RenderFragment ChildContent { get; set; }

    [Parameter] public string AuthorName { get; set; }

    [Parameter] public string AuthorImage { get; set; }

    [Parameter] public string PostedOn { get; set; }

    [Parameter] public string ReadTime { get; set; }
}
